home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / Development / PartMaker / Container•1.0d11v2 / Container•1.0d11v2.rsrc / dFRK_5092 < prev    next >
Encoding:
Text File  |  1995-12-08  |  2.8 KB  |  102 lines

  1. //========================================================================================
  2. //
  3. //    File:                PalFrame.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //
  8. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef PALFRAME_H
  13. #define PALFRAME_H
  14.  
  15. // ----- OS Layer -----
  16.  
  17. #ifndef FLOATFRM_H
  18. #include "FloatFrm.h"
  19. #endif
  20.  
  21. //========================================================================================
  22. // Forward Declaration
  23. //========================================================================================
  24.  
  25. #if FW_LIB_EXPORT_PRAGMAS
  26. #pragma import on
  27. #endif
  28. class FW_CLASS_ATTR FW_CFacetContext;
  29. class FW_CLASS_ATTR FW_CColor;
  30. class FW_CLASS_ATTR FW_CMouseEvent;
  31. #if FW_LIB_EXPORT_PRAGMAS
  32. #pragma import off
  33. #endif
  34.  
  35. class FW_CLASS_ATTR CGrid;
  36.  
  37. //========================================================================================
  38. // CPalette
  39. //========================================================================================
  40.  
  41. class FW_CLASS_ATTR CPalette
  42. {
  43. //----------------------------------------------------------------------------------------
  44. // Initialization/destruction
  45. //
  46. public:        
  47.     CPalette();
  48.     virtual ~ CPalette();
  49.  
  50. //----------------------------------------------------------------------------------------
  51. // New API
  52. //
  53. public:
  54.     void    GetColor(short colorIndex, FW_CColor* color) const;
  55.     short    NumberOfColors() const
  56.                 {return fNumbersOfColors;}
  57.  
  58. //----------------------------------------------------------------------------------------
  59. // Data Members
  60. //
  61. private:
  62.     short            fNumbersOfColors;
  63. #ifdef FW_BUILD_MAC
  64.     CTabHandle        fColorTable;
  65. #endif
  66. #ifdef FW_BUILD_WIN
  67.     PALETTEENTRY*    fColorTable;
  68. #endif
  69. };
  70.  
  71. //========================================================================================
  72. // CPaletteFrame
  73. //========================================================================================
  74.  
  75. class FW_CLASS_ATTR CPaletteFrame : public CFloatingWindowFrame
  76. {
  77. //----------------------------------------------------------------------------------------
  78. // Initialization/destruction
  79. //
  80. public:        
  81.     CPaletteFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, CContainerPart* containerPart);
  82.     virtual ~ CPaletteFrame();
  83.  
  84. //----------------------------------------------------------------------------------------
  85. // Inherited API
  86. //
  87. public:        
  88.     virtual void             Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
  89.     virtual FW_Boolean        DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
  90.  
  91.     virtual void            FacetAdded(Environment* ev, ODFacet* facet);
  92.     
  93. //----------------------------------------------------------------------------------------
  94. // Data Members
  95. //
  96. private:
  97.     CPalette*                fPalette;
  98.     CGrid                    *fGrid;
  99. };
  100.  
  101. #endif
  102.